1. Field of the Invention
The present invention relates to the field of networked applications, and more particularly to a system and method for automatically partitioning application components between a web server and an application server.
2. Description of the Related Art
The field of application servers has recently become one of the fastest-growing and most important fields in the computing industry. As web applications and other distributed applications have evolved into large-scale applications that demand more sophisticated computing services, specialized application servers have become necessary to provide a platform supporting these large-scale applications. Applications that run on application servers are generally constructed according to an N-tier architecture, in which presentation, business logic, and data access layers are kept separate. The application server space is sometimes referred to as xe2x80x9cmiddlewarexe2x80x9d, since application servers are often responsible for deploying and running the business logic layer and for interacting with and integrating various enterprise-wide resources, such as web servers, databases, and backend or legacy systems.
Application servers offer significant advantages over previous approaches to implementing web applications, such as using common gateway interface (CGI) scripts or programs. For example, application servers typically provide various application services for tasks that web applications and other networked applications commonly need to perform. Application servers often incorporate these services and components into an integrated platform specialized for creating web applications. The platform may leverage various standard software component models, such as the Common Object Request Broker Architecture (CORBA), the (Distributed) Component Object Model (COM/DCOM), Enterprise JavaBeans(trademark) (EJB), etc., or the platform may provide its own software component model or may extend standard component models in various ways.
The following list is a partial list of the types of application services that application servers may provide. By leveraging these types of integrated, pre-built services, web application developers may realize a significant reduction in application development time and may also be able to develop a more robust, bug-free application. Application servers from different vendors differ, of course, in the types of services they provide; thus, the following list is exemplary only.
Application servers may provide data access services for accessing various types of databases, e.g. through directly supporting proprietary databases, such as SAP, Lotus Notes, PeopleSoft, etc., or through standardized interfaces, such as ODBC, JDBC, etc. Also, application servers may enable database connection pooling or caching.
Application servers may also provide services for accessing network directories, such as directories that support the standard Lightweight Directory Access Protocol (LDAP).
Application servers may also provide application security services. Web application security may be considered at different levels, such as: client-to-server communication, application-level privileges, database access, directory service access, etc. Application server security-related services may include support for performing user authentication, performing data encryption, communicating via secure protocols such as Secure Sockets Layer (SSL), utilizing security certificates, programming user access rights, integrating with operating system security, etc.
Application servers may also provide services enabling a web application to easily maintain user state information during a user session or across user sessions. Performing state and session management is especially important for applications that have complex, multi-step transactions.
Application servers may also support caching the results of application logic execution or caching the results of web page or application component output, so that for appropriate subsequent requests, the results may be reused.
Application servers may also support result streaming, such as dynamically streaming HTTP output, which may be especially useful for large result sets involving lengthy queries. A related service may enable an application to easily display a large result set by breaking the result set down into smaller groups and displaying these groups to the user one at a time.
Many web applications need to perform various types of searching or indexing operations. Application servers may also provide application services for indexing or searching various types of documents, databases, etc.
As noted above, many web applications may perform various types of complex, multi-step transactions. Application servers may also provide support for managing these application transactions. For example, this support may be provided via a software component model supported by the application server, such as the Enterprise JavaBeans(trademark) component model, or via integration with third-party transaction process monitors, etc.
It is often desirable to enable web applications to perform certain operations independently, as opposed to in response to a user request. For example, it may be desirable for an application to automatically send a newsletter to users via email at regularly scheduled intervals. Application servers may support the creation and scheduling of events to perform various types of operations.
Many types of web applications need to perform e-commerce transactions, such as credit card transactions, financial data exchange, etc. Application servers may provide services for performing various types of e-commerce transactions or may provide an integrated third-party e-commerce package for applications to use.
Web applications often need to utilize various types of standard network application services, such as an email service, FTP service, etc. Application servers may provide these types of services and may enable applications to easily integrate with the services.
Web applications often need to log various conditions or events. Application servers may provide an integrated logging service for web applications to use.
Judging by the exemplary list above of computing services that application servers may provide for web applications or other networked applications, it is apparent that application servers may integrate a diverse range of services, where these services may interact with many different types of servers, systems, or other services. For example, an application server may act as a platform hub connecting web servers, database servers/services, e-commerce servers/services, backend or legacy systems, or any of various other types of systems or services. A benefit of many application servers is that they not only provide this service/system integration, but typically also provide centralized administrative or management tools for performing various aspects of system and application administration.
For example, application servers may provide management tools related to application development and deployment, such as tools for source code control and versioning, bug tracking, workgroup development, etc. Application servers may also provide tools related to application testing and deployment, such as tools for application prototyping, load simulation, dynamic code base updates, etc. Application servers may also provide tools for easily configuring the application to utilize various of the application server services described above. For example, administrators may use a tool to set the result caching criteria for particular application components or pages, or may use a tool to specify which documents to index or to specify indexing methods, etc.
One important class of application server administrative tools pertains to real-time application management and monitoring. Application servers may provide tools for dynamically managing various factors affecting application performance, e.g., by adjusting the application services and support features described above. For example, application server tools may allow administrators to:
dynamically adjust the number of database connections maintained in a database pool, in order to determine the optimum pool size for maximum performance
clear or resize application output caches
dynamically change various aspects of system or application security
schedule or trigger events, such as events for sending e-mail reports to application users, generating reports based on collected data, etc.
start and stop various application services, such as email or FTP services, from a centralized user interface
This list is, of course, exemplary, and particular application servers may support different types of centralized application management.
In addition to the factors discussed above, many application servers also include means for providing various types of system reliability and fault tolerance. One common technique related to fault tolerance is known as application server xe2x80x9cclusteringxe2x80x9d. Application server clustering refers to tying together two or more application servers into a system. In some cases, this xe2x80x9ctying togetherxe2x80x9d may mean that application code, such as particular software components, is replicated on multiple application servers in a cluster, so that in the case of a hardware or software failure on one application server, user requests may be routed to and processed by other application servers in the cluster.
Application server clustering may also facilitate application performance and scalability. Application servers may be added to a cluster in order to scale up the available processing power by distributing work. Advantageously, application servers often enable this type of scaling up to be down without requiring changes to the application code itself.
Work may be distributed across an application server cluster in different ways. For example, as discussed above, application code may be replicated across multiple application servers in the cluster, enabling a given request to be processed by any of these multiple application servers. Also, application code may be logically partitioned over multiple servers, e.g., so that a particular application server is responsible for performing particular types of operations. This type of application partitioning may help application performance in various ways. For example, application partitioning may reduce the need for an application server to perform context switching between different types of operations, such as CPU-intensive operations versus input/output-intensive operations. Also, application partitioning may be used to match application processing to various physical characteristics of a system, such as network characteristics. For example, data-intensive application logic may be configured to run on an application server that is closest to a data source, in order to reduce the latencies associated with accessing remotely located data.
In the case of application code replication, where multiple application servers are capable of processing a given request, it is often desirable to route the request to the xe2x80x9cbestxe2x80x9d application server currently available to process the request. The xe2x80x9cbestxe2x80x9d application server may, for example, be considered as the application server that will enable the request to be processed and the request results to be returned to the client as quickly as possible. On a broader scale, the xe2x80x9cbestxe2x80x9d application server may be considered as the application server that will enhance some aspect of the performance of the overall application to the greatest possible extent. The mapping of client requests to application servers, which may use various algorithms and techniques, is known as xe2x80x9capplication server load balancing.xe2x80x9d
A web application may include various application components that can be referenced by uniform resource locators (URLs). For example, different application components may perform particular functions in response to user requests. The type of application component used may depend on the particular application server platform. Common types of application components include Java(trademark) application components (e.g., JavaServer Pages(trademark) (JSP) components, Java(trademark) Servlet components, and Enterprise JavaBeans(trademark) (EJB) components), CORBA components, ActiveX components, etc.
In prior art systems, web server computers typically receive client requests referencing these application components, e.g., from web browsers, and forward the requests to application server computers. The application server computer then executes the referenced application component. Thus, the web server(s) effectively becomes a multiplexor for incoming application component requests, simply redirecting the requests to the application server(s). This essentially makes the web server redundant for these requests and misses the opportunity to utilize the web server for increased scalability to improve application performance and throughput.
It would be desirable to instead deploy a portion of the application components on the web server, thus distributing the application and enabling greater scalability, performance and response. Of course, not all application components may be able to execute on the web server. For example, as described above, the application server may provide various services that the application components may utilize. Depending on which (if any) of these services a given application component utilizes, the application component may or may not be required to execute on the application server. It would thus be desirable to provide a system and method for automatically analyzing a set of application components to determine a subset of the application components that can execute on the web server and to partition the components between the web server and the application server accordingly.
The problems described above may in large part be solved by providing a system and method for automatically partitioning application components of a web application between a web server and an application server, such as described herein. In various embodiments, the application components may comprise any of various types of executable application components, such as Java(trademark) application components (e.g., JavaServer Pages(trademark) (JSP) components, Java(trademark) Servlet components, and Enterprise JavaBeans(trademark) (EJB) components), CORBA components, ActiveX components, C++ components, etc., or application components constructed according to a proprietary specification.
The system supporting the web application may comprise one or more web server computers connected to one or more application server computers. Both the web server computer(s) and the application server computer(s) may implement an application component container. As used herein, an application component container refers to a software framework that directly manages and supports the execution of application components. For example, in an embodiment in which the application components include Java(trademark) application components, an application component container may comprise a container such as specified in the Java(trademark) 2 Platform Enterprise Edition Specification, v1.3.
Some application components may be able to execute on the web server computer under management of its application component container. Other application components may need to execute on the application server computer under management of its application component container. For example, application components that need to execute on the application server computer may utilize services or resources available only from the application server computer. A method for programmatically analyzing the application components to determining an appropriate partitioning of the application components between the web server and application server computers may be employed. As used herein, programmatically analyzing the application components may include any technique or method implemented by a program that inspects or examines the application components or meta-information describing the application components. In various embodiments, this analysis may be performed in any of various ways, e.g., depending on the type of application components. One particular technique for analyzing components of a Java(trademark) 2 Platform Enterprise Edition application is described.
As the web server computer receives a request from a client computer, the web server may treat the request differently, depending on the particular resource or application component the request references. For example, if the request references a document, such as an HTML document, then the web server may process the request itself, e.g., by retrieving the document from the web server""s local file system or from a local cache and returning the document to the client computer. Similarly, if the request references an application component that is deployed on the web server computer, then the web server may invoke execution of the application component by the application component container implemented on the web server computer. If, on the other hand, the request references an application component that is deployed on the application server computer, then the web server may forward or redirect the request to the application server computer. The application server computer may then invoke execution of the referenced application component by the application component container implemented on the application server computer.
Thus, the system may improve application performance by increasing the degree of distribution of the application and improving the ability of the application server computer to service those requests that require services or information provided by the application server computer, allowing the web server computer to service those requests that do not require services or information provided by the application server computer.
In one embodiment, a deployment computer system may be connected to the web server and application server computers through a network. After the application components have been analyzed to determine an appropriate partitioning of the application components between the web server and the application server, the deployment computer system may then be operable to automatically deploy the application components on the respective computer systems according to this determined partitioning.
Deploying an application component on a computer system may comprise performing actions necessary to make that application component available for execution on the computer system. For example, for an application component that needs to be deployed on the application server computer, deploying the application component may involve copying one or more files representing the application component onto a file system of the application server computer. For example, the application component may be stored on the deployment computer system or on a file system accessible to the deployment computer system, and it may be necessary to move the application component to a file system of the application server computer. In various embodiments, deploying the application component may also involve updating information of the respective computer system, such as database or registry information, to enable the computer system to invoke the application component in response to client requests referencing that component.